/****************************************/
/* Player.h			 					*/
/* Created on: Sep 4, 2011				*/
/* Copyright Playsoft 2011				*/
/* Released under GPL v2				*/
/****************************************/

#ifndef PLAYER_H_
#define PLAYER_H_

#include <allegro.h>

class Flower;
class Leg;
class Player
{

public:
	enum eOrientation
	{
		eOrientation_Left,
		eOrientation_Right

	};
	Player(int p_xStartPos,int p_yStartPos);

	void Draw(BITMAP *buffer);
	void GoLeft();
	void GoRight();
	void Jump();

	void Update(float p_growSpeed,Flower*  p_flowers[6],Leg *legs[4]);
	float m_xPosition;
	float m_yPosition;

private:
	SAMPLE *jump;
	SAMPLE *hit;

private:
	BITMAP *playerImage;

	BITMAP *playerLeft;
	BITMAP *playerRight;
	BITMAP *playerJumpRight;
	BITMAP *playerJumpLeft;
	eOrientation m_PlayerOrientation;

	float m_baseWalkSpeed;
	float m_jumpSpeed;
	float m_jumpMaxSpeed;
	float m_jumpMaxTimeout;

	bool m_Landed;
	int m_landedOn;
	float m_height;

	float m_xSpeed;
	float m_ySpeed;

	int SpeeedModifier;

	int jumpTimeout;

public:
	int lives;

};

#endif
